package com.gxar.uaa.server.base.model.menu.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author linsy
 * @version 1.0
 * @created 2024/1/26 09:21
 */
@Data
public class BaseMenuVO {

    @ApiModelProperty("父节点ID")
    @JSONField(name = "parent_id")
    @JsonProperty("parent_id")
    @NotNull(message = "父菜单不能为空")
    private Long parentId;
    @ApiModelProperty("名称")
    @JSONField(name = "name")
    @JsonProperty("name")
    @NotBlank(message = "菜单名称不能为空")
    private String name;
    @ApiModelProperty("样式")
    @JSONField(name = "icon")
    @JsonProperty("icon")
    private String icon;
    @ApiModelProperty("请求后端url")
    @JSONField(name = "url")
    @JsonProperty("url")
    private String url;
    @ApiModelProperty("菜单path")
    @JSONField(name = "path")
    @JsonProperty("path")
    private String path;
    @ApiModelProperty("排序")
    @JSONField(name = "order")
    @JsonProperty("order")
    @NotNull(message = "排序不能为空")
    private Integer sort;
    @ApiModelProperty("菜单类型")
    @JSONField(name = "type")
    @JsonProperty("type")
    @NotNull(message = "菜单类型不能为空")
    private Integer type;
    @ApiModelProperty("请求方法")
    @JSONField(name = "url_method")
    @JsonProperty("url_method")
    private String urlMethod;
    @ApiModelProperty("应用")
    @JSONField(name = "app")
    @JsonProperty("app")
    @NotBlank(message = "app不能为空")
    private String app;
    @ApiModelProperty("组件")
    @JSONField(name = "component")
    @JsonProperty("component")
    private String component;
    @ApiModelProperty("外链")
    @JSONField(name = "href")
    @JsonProperty("href")
    private String href;
    @ApiModelProperty("i18n标题")
    @JSONField(name = "i18n_title")
    @JsonProperty("i18n_title")
    private String i18nTitle;
    @ApiModelProperty("标题")
    @JSONField(name = "title")
    @JsonProperty("title")
    private String title;
    @ApiModelProperty("路由的动态路径")
    @JSONField(name = "dynamic_path")
    @JsonProperty("dynamic_path")
    private String dynamicPath;
    @ApiModelProperty("作为单级路由的父级路由布局组件")
    @JSONField(name = "single_layout")
    @JsonProperty("single_layout")
    private String singleLayout;
    @ApiModelProperty("需要登录权限")
    @JSONField(name = "requires_auth")
    @JsonProperty("requires_auth")
    private Boolean requiresAuth;
    @ApiModelProperty("缓存页面")
    @JSONField(name = "keep_alive")
    @JsonProperty("keep_alive")
    private Boolean keepAlive;
    @ApiModelProperty("本地icon")
    @JSONField(name = "local_icon")
    @JsonProperty("local_icon")
    private String localIcon;
    @ApiModelProperty("是否隐藏")
    @JSONField(name = "hide")
    @JsonProperty("hide")
    @NotNull(message = "是否隐藏不能为空")
    private Boolean hide;
    @ApiModelProperty("是否支持多个tab页签")
    @JSONField(name = "multi_tab")
    @JsonProperty("multi_tab")
    private Boolean multiTab;
    @ApiModelProperty("当前路由需要选中的菜单项")
    @JSONField(name = "active_menu")
    @JsonProperty("active_menu")
    private String activeMenu;
    @ApiModelProperty("表示是否是多级路由的中间级路由")
    @JSONField(name = "multi")
    @JsonProperty("multi")
    private Boolean multi;
    @ApiModelProperty("是否固定在tab卡不可关闭")
    @JSONField(name = "affix")
    @JsonProperty("affix")
    private Boolean affix;
    @ApiModelProperty("是否显示侧边栏")
    @JSONField(name = "hide_sidebar")
    @JsonProperty("hide_sidebar")
    private Boolean hideSidebar;
    @ApiModelProperty("是否显示Tab标签")
    @JSONField(name = "hide_tabs")
    @JsonProperty("hide_tabs")
    private Boolean hideTabs;
    @ApiModelProperty("是否显示底部标签")
    @JSONField(name = "hide_footer")
    @JsonProperty("hide_footer")
    private Boolean hideFooter;
    @ApiModelProperty("路由重定向")
    @JSONField(name = "redirect")
    @JsonProperty("redirect")
    private String redirect;
    @ApiModelProperty("选择类型 0-全选 1-半选")
    @JSONField(name = "select_type")
    @JsonProperty("select_type")
    private Integer selectType;
}
